import React, { useState } from 'react';

function FunctionState() {
  // 声明一个新的叫做 'count' 的 state 变量
  const [state, setState] = useState(0);
  return (
    <div>
      <p>You clicked {state} times</p>
      <button onClick={() => setState(state + 1)}>Click me</button>
    </div>
  );
}

export default FunctionState;
